# $Id: PKGBUILD 182885 2013-04-15 22:21:07Z heftig $
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=meld
pkgver=1.7.2
pkgrel=1
pkgdesc='Visual diff and merge tool'
arch=('any')
url='http://meldmerge.org/'
license=('GPL')
depends=('pygtk' 'hicolor-icon-theme' 'desktop-file-utils')
makedepends=('intltool' 'gnome-doc-utils')
optdepends=('pygtksourceview2: syntax highlighting'
            'python2-dbus: open a new tab in an already running instance'
            'python2-gconf: gnome integration')
install=meld.install
source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
sha256sums=('ece1f086f0c23395060abcdca03795e739e072d5032aac8a9a1fb1502c806e9f')

prepare() {
  cd $pkgname-$pkgver
  sed -i 's/update-/#update-/' Makefile
  sed -i 's/env python/env python2/' bin/meld
}

build() {
  cd $pkgname-$pkgver
  make PYTHON=/usr/bin/python2 prefix=/usr
}

package() {
  cd $pkgname-$pkgver
  make PYTHON=/usr/bin/python2 prefix=/usr DESTDIR="$pkgdir" install
}
